<template>
  <demoBlock title="基础用法">
    <vcu-cell is-link value="预览图片" @click="showImagePreview()" />
  </demoBlock>
</template>

<script>
import { defineComponent, getCurrentInstance } from "vue";
import { ImagePreview } from "../../../components";
export default defineComponent({
  setup() {
    const { proxy } = getCurrentInstance();
    const images = [
      `${proxy.serverIp}/images/car.jpg`,
      `${proxy.serverIp}/images/j20.jpg`,
      `${proxy.serverIp}/images/588ku.jpg`,
      `${proxy.serverIp}/images/om.jpg`,
    ];
    const showImagePreview = () => {
      ImagePreview({
        images,
      });
    };

    return {
      showImagePreview,
    };
  },
});
</script>
